package hikari.hcomponents;

import hikari.gui.guicomponents.ExpandablePanel;
import hikari.objects3d.Basic3dObject;
import hikari.persistence.file.FileSection;
import java.io.IOException;
import javax.swing.JMenuItem;

/**
 * @author Dmitry
 */
public abstract class HComponent extends ExpandablePanel {
    private String name;
    private boolean enabled;

    public String getHComponentName() {
        return name;
    }

    public void setHComponentName(String name) {
        this.name = name;
    }

    public boolean isHComponentEnabled() {
        return enabled;
    }

    public void setHComponentEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public void onClose() {
    }

    public RenderEvent registerAfterRenderBeforeGuiEvent() {
        return null;
    }

    public RenderEvent registerAfterRenderEvent() {
        return null;
    }

    public RenderEvent registerBeforeRenderEvent() {
        return null;
    }

    public void writeData(FileSection section) throws IOException {
    }

    public void loadData(FileSection section, Basic3dObject object) throws IOException {
    }

    public boolean isObjectUpdateable() {
        return false;
    }

    public JMenuItem[] submitPopupMenuItems() {
        return new JMenuItem[0];
    }

    public boolean isDeleteable() {
        return false;
    }

    public void onDeleteComponent() {

    }
}
